class Human:
    def __init__(self,name,weight):
        self.name=name
        self.weight=weight

    def eat(self):
        self.weight+=1
        print(f'{self.name}在吃饭,胖了1斤')

    def run(self):
        self.weight-=0.5
        print(f'{self.name}在吃饭,瘦了0.5斤')

    def __str__(self):
        return f'小张目前的体重是{self.weight}'

xiaozhang = Human('小张',60.0)
xiaozhang.eat()
xiaozhang.run()
print(xiaozhang)

